package com.mfl.controller.user;

import com.mfl.common.Result;
import com.mfl.pojo.vo.NoticeVO;
import com.mfl.service.NoticeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController("userNoticeController")
@RequestMapping("/cky/user/notice")
@Slf4j
public class NoticeController {

    @Autowired
    private NoticeService noticeService;

    /**
     * 获取公告信息（启动）
     * @return
     */
    @GetMapping("/getNoticeEnable")
    public Result<NoticeVO> getNotice(){
        log.info("获取公告信息（启动）");
        NoticeVO vo = noticeService.getNoticeEnable();
        return Result.success("", vo);
    }
}
